<#macro form_field_validations>
<#escape x as x?js_string>
	var formSubmitResult = JSON.parse( jqXHR.responseText );
	for( var i = 0; i < formSubmitResult.errors.length; i++ ){
		if( formSubmitResult.errors[i].field == '__service__' ){
			$('#dlg_error .uic-dialog-message-wrapper-text').text(formSubmitResult.errors[i].value);
			$('#dlg_error').trigger('show');
			return;
		}
		$('#' + formSubmitResult.errors[i].field + '_validation').empty().append( formSubmitResult.errors[i].value );
	}
</#escape>
</#macro>


